package com.xuyiwei.xblog.modular.system.warpper;

import com.xuyiwei.xblog.business.system.model.Notice;
import com.xuyiwei.xblog.business.system.result.notice.out.NoticeDto;
import com.xuyiwei.xblog.core.base.constant.enums.NoticeType;
import com.xuyiwei.xblog.core.common.constant.factory.ConstantFactory;
import com.xuyiwei.xblog.core.base.warpper.BaseControllerWarpper;

import java.util.List;
import java.util.Map;

/**
 * 部门列表的包装
 *
 * @author fengshuonan
 * @date 2017年4月25日 18:10:31
 */
public class NoticeWrapper extends BaseControllerWarpper {

    public NoticeWrapper(List<NoticeDto> list) {
        super(list);
    }

    @Override
    public void warpTheMap(Map<String, Object> map) {
        String type = (String) map.get("type");
        NoticeType typeMsg = NoticeType.convert(type);
        map.put("typeDesc", typeMsg.getDesc());
    }

}
